//
//  ICSocketRequestManager.h
//  ICome
//
//  Created by zhangrongwu on 16/8/5.
//  Copyright © 2016年 iCom. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ICSocketCommunicationManager.h"
#import "ICHeaderFile.h"

#define requestSuccess [[NSString stringWithFormat:@"%@",[data objectForKey:@"errno"]] isEqualToString:@"0"]

typedef void(^SocketSuccessCompletionHandle)(id object);
typedef void(^SocketFailureCompletionHandle)(NSError *error, id other);
typedef void(^SendSuccessCompletionHandle)(id object, id other);

@interface ICSocketRequestManager : NSObject

+(ICSocketRequestManager *)sharedInstance;

// 7
- (NSDictionary *)packageRequestObject:(id)object Api:(NSString *)api;
// 5
- (NSDictionary *)packageLocationRequestObject:(id)object Api:(NSString *)api;
// 13
- (NSDictionary *)packageActionRequestObject:(id)object Api:(NSString *)api;

/** 轻应用列表*/
-(void)requestAppListWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;
/** 应用搜索*/
-(void)requestSearchAppListWithObject:(NSDictionary *)param
                              Success:(SocketSuccessCompletionHandle)success
                              Failure:(SocketFailureCompletionHandle)failure;
/** 关注应用*/
-(void)subAppWithObject:(NSDictionary *)param
                Success:(SocketSuccessCompletionHandle)success
                Failure:(SocketFailureCompletionHandle)failure;

/** 取消关注应用*/
-(void)unSubAppWithObject:(NSDictionary *)param
                  Success:(SocketSuccessCompletionHandle)success
                  Failure:(SocketFailureCompletionHandle)failure;

/** 拉取消息处理 mPull*/
- (void)mPullMessageWithObject:(id)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;
/** 更新组信息*/
-(void)updateGroupInfoWithObject:(id)param
                         Success:(SocketSuccessCompletionHandle)success
                         Failure:(SocketFailureCompletionHandle)failure;
/** 消息pull 操作*/
- (void)imServerPullWithObject:(id)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;

/** 送达号DirectMPull 同步*/
- (void)mPullDirectWithObject:(id)param
                      Success:(SocketSuccessCompletionHandle)success
                      Failure:(SocketFailureCompletionHandle)failure;
/** grouplist */
- (void)updateGroupListWithObject:(id)param
                          Success:(SocketSuccessCompletionHandle)success
                          Failure:(SocketFailureCompletionHandle)failure;
/** directList */
- (void)updateDirectListWithObject:(id)param
                           Success:(SocketSuccessCompletionHandle)success
                           Failure:(SocketFailureCompletionHandle)failure;
/** directInfo */
-(void)updateDirectInfoWithObject:(id)param
                          Success:(SocketSuccessCompletionHandle)success
                          Failure:(SocketFailureCompletionHandle)failure;

/** CmdList */
-(void)updateCmdListWithObject:(id)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;
/** return cmd action */
- (void)confirmActionWithObject:(id)param;

/** user info */
-(void)requestUserInfoWithObject:(NSDictionary *)param
                         Success:(SocketSuccessCompletionHandle)success
                         Failure:(SocketFailureCompletionHandle)failure;

//  获取oId组织之下的直接组织列表和直接员工列表
-(void)getSubOrgAndSubEmpListWithObject:(NSDictionary *)param
                                Success:(SocketSuccessCompletionHandle)success
                                Failure:(SocketFailureCompletionHandle)failure;

//  根据oid获取我的部门
-(void)getOrgsByoIdWithObject:(NSDictionary *)param
                      Success:(SocketSuccessCompletionHandle)success
                      Failure:(SocketFailureCompletionHandle)failure;

//  根据eid获取我的部门
-(void)getOrgsByeIdWithObject:(NSDictionary *)param
                      Success:(SocketSuccessCompletionHandle)success
                      Failure:(SocketFailureCompletionHandle)failure;

//  打开双人会话
-(void)createTwoGroupWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;

// 应用详情
-(void)getAppDetailWithObject:(NSDictionary *)param
                      Success:(SocketSuccessCompletionHandle)success
                      Failure:(SocketFailureCompletionHandle)failure;


// 用户电话
-(void)updatePhoneWithObject:(NSDictionary *)param
                     Success:(SocketSuccessCompletionHandle)success
                     Failure:(SocketFailureCompletionHandle)failure;


// 全局免打扰 api
-(void)setGlobalBusyWithObject:(NSDictionary *)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;
// 获取忙时状态
-(void)getGlobalBusyWithObject:(NSDictionary *)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;

// 员工搜索 and 组织搜索 －>
-(void)contactSearchListWithObject:(NSDictionary *)param
                           Success:(SocketSuccessCompletionHandle)success
                           Failure:(SocketFailureCompletionHandle)failure;

// 员工搜索 or 组织搜索
-(void)searchEmpOROrgWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;

// 获取tId的组员信息列表
-(void)getTeamEmployeListWithObject:(NSDictionary *)param
                            Success:(SocketSuccessCompletionHandle)success
                            Failure:(SocketFailureCompletionHandle)failure;

// 获取团队列表
-(void)getTeamListWithObject:(NSDictionary *)param
                     Success:(SocketSuccessCompletionHandle)success
                     Failure:(SocketFailureCompletionHandle)failure;
// recall
- (void)recallMessageWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;
// repull
- (void)repullMessageWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;
// groupInfo
- (void)groupInfoWithObject:(NSDictionary *)param
                    Success:(SocketSuccessCompletionHandle)success
                    Failure:(SocketFailureCompletionHandle)failure;
// breakGroup
- (void)disbandGroupWithObject:(NSDictionary *)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;

// exist group
- (void)existGroupWithObject:(NSDictionary *)param
                     Success:(SocketSuccessCompletionHandle)success
                     Failure:(SocketFailureCompletionHandle)failure;
// group busy
- (void)groupBusyWithObject:(NSDictionary *)param
                    Success:(SocketSuccessCompletionHandle)success
                    Failure:(SocketFailureCompletionHandle)failure;
// append user
- (void)appendUserWithObject:(NSDictionary *)param
                     Success:(SocketSuccessCompletionHandle)success
                     Failure:(SocketFailureCompletionHandle)failure;
// change group name
- (void)changeGroupNameWithObject:(NSDictionary *)param
                          Success:(SocketSuccessCompletionHandle)success
                          Failure:(SocketFailureCompletionHandle)failure;
// kick group user
- (void)kickGroupUserWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;

// kick group user_array
- (void)kickGroupUserArrayWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;

// deliver list
- (void)deliverListWithObject:(NSDictionary *)param
                      Success:(SocketSuccessCompletionHandle)success
                      Failure:(SocketFailureCompletionHandle)failure;
// subDirect
- (void)subDirectWithObject:(NSDictionary *)param
                    Success:(SocketSuccessCompletionHandle)success
                    Failure:(SocketFailureCompletionHandle)failure;
// voice read
- (void)voiceReadWithObject:(NSDictionary *)param
                    Success:(SocketSuccessCompletionHandle)success
                    Failure:(SocketFailureCompletionHandle)failure;
// mult group
- (void)multGroupWithObject:(NSDictionary *)param
                    Success:(SocketSuccessCompletionHandle)success
                    Failure:(SocketFailureCompletionHandle)failure;
// addNews
- (void)addNewsWithObject:(NSDictionary *)param
                  Success:(SocketSuccessCompletionHandle)success
                  Failure:(SocketFailureCompletionHandle)failure;
// create org group
- (void)createOrgGroupWithObject:(NSDictionary *)param
                         Success:(SocketSuccessCompletionHandle)success
                         Failure:(SocketFailureCompletionHandle)failure;
// change master
- (void)changeMasterWithObject:(NSDictionary *)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;
// direct busy
- (void)directBusyWithObject:(NSDictionary *)param
                     Success:(SocketSuccessCompletionHandle)success
                     Failure:(SocketFailureCompletionHandle)failure;
// search direct
- (void)searchDirectWithObject:(NSDictionary *)param
                       Success:(SocketSuccessCompletionHandle)success
                       Failure:(SocketFailureCompletionHandle)failure;
// change nickName
- (void)changeNickNameWithObject:(NSDictionary *)param
                         Success:(SocketSuccessCompletionHandle)success
                         Failure:(SocketFailureCompletionHandle)failure;
// deliver repull 
- (void)deliverRepullWithObject:(NSDictionary *)param
                        Success:(SocketSuccessCompletionHandle)success
                        Failure:(SocketFailureCompletionHandle)failure;
// direct info
- (void)directInfoWithObject:(NSDictionary *)param
                     Success:(SocketSuccessCompletionHandle)success
                     Failure:(SocketFailureCompletionHandle)failure;
// group read
- (void)groupReadWithObject:(NSDictionary *)param
                    Success:(SocketSuccessCompletionHandle)success
                    Failure:(SocketFailureCompletionHandle)failure;










@end
